<html>
<head><meta charset="utf-8"><title>performance · t-compiler/wg-polonius · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/index.html">t-compiler/wg-polonius</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html">performance</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="169554850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169554850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169554850">(Jul 03 2019 at 10:24)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="204115">@Albin Stjerna</span> -- in <a href="https://github.com/rust-lang-nursery/polonius/issues/109" target="_blank" title="https://github.com/rust-lang-nursery/polonius/issues/109">polonius#109</a>, you mentioned perf was abysmal?</p>



<a name="169556708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169556708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169556708">(Jul 03 2019 at 11:01)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> It might have been a bit of an overstatement, given that I haven't even measured it, but I mainly meant the delta of performance introduced by the changes surely must be, given that I am for every variable walking the entire MIR and generating facts, etc</p>



<a name="169556717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169556717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169556717">(Jul 03 2019 at 11:01)</a>:</h4>
<p>It's not a problem yet, especially as we're not going to keep it</p>



<a name="169556728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169556728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169556728">(Jul 03 2019 at 11:01)</a>:</h4>
<p>ok ok</p>



<a name="169556730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169556730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169556730">(Jul 03 2019 at 11:01)</a>:</h4>
<p>But it seems that the liveness calculations in general does play a big role in the solve-time in my benchmarks</p>



<a name="169556782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169556782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169556782">(Jul 03 2019 at 11:02)</a>:</h4>
<p>yeah, we need to investigate -- among other things, we don't actually need to compute liveness for all variables</p>



<a name="169556786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169556786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169556786">(Jul 03 2019 at 11:02)</a>:</h4>
<p>this was something we spent some time tuning in rustc</p>



<a name="169556790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169556790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169556790">(Jul 03 2019 at 11:02)</a>:</h4>
<p>I can imagine</p>



<a name="169556808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169556808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169556808">(Jul 03 2019 at 11:03)</a>:</h4>
<p>This is the heatmap from 789 518 functions of 1738 crates: <br>
<a href="/user_uploads/4715/bIWeZb5Al5DLoe3-yjx2d9PH/pasted_image.png" target="_blank" title="pasted_image.png">pasted image</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/bIWeZb5Al5DLoe3-yjx2d9PH/pasted_image.png" target="_blank" title="pasted image"><img src="/user_uploads/4715/bIWeZb5Al5DLoe3-yjx2d9PH/pasted_image.png"></a></div>



<a name="169556821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169556821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169556821">(Jul 03 2019 at 11:03)</a>:</h4>
<p>(where it is among other things obvious that my analysis on the CFG gave no useful information)</p>



<a name="169556830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169556830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169556830">(Jul 03 2019 at 11:03)</a>:</h4>
<p>It's correlation vs normalised runtime</p>



<a name="169556884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169556884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169556884">(Jul 03 2019 at 11:04)</a>:</h4>
<p>In particular, the initialisation and liveness facts are <em>really</em> hot</p>



<a name="169556891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169556891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169556891">(Jul 03 2019 at 11:04)</a>:</h4>
<p>But yes, More Analysis Needed™</p>



<a name="169556898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169556898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169556898">(Jul 03 2019 at 11:04)</a>:</h4>
<p>(I had some errands, but I'll finish the PRs for review soon!)</p>



<a name="169556923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169556923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169556923">(Jul 03 2019 at 11:05)</a>:</h4>
<p>Oh, and these are histograms for the solve-times: <a href="/user_uploads/4715/a4oAzKiLbByaneOZO1frAz9p/pasted_image.png" target="_blank" title="pasted_image.png">pasted image</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/a4oAzKiLbByaneOZO1frAz9p/pasted_image.png" target="_blank" title="pasted image"><img src="/user_uploads/4715/a4oAzKiLbByaneOZO1frAz9p/pasted_image.png"></a></div>



<a name="169556976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169556976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169556976">(Jul 03 2019 at 11:06)</a>:</h4>
<p>As you can see, very short solve-times completely dominate</p>



<a name="169556990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169556990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169556990">(Jul 03 2019 at 11:06)</a>:</h4>
<p>one other thing -- in the PR, there is a CLI flag for disabling the <code>region_live_at</code> facts -- do we need that? can we just remove said facts altogether?</p>



<a name="169556997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169556997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169556997">(Jul 03 2019 at 11:06)</a>:</h4>
<blockquote>
<p>As you can see, very short solve-times completely dominate</p>
</blockquote>
<p>what is the range of samples here?</p>



<a name="169557004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169557004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169557004">(Jul 03 2019 at 11:06)</a>:</h4>
<p>For solve-times?</p>



<a name="169557016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169557016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169557016">(Jul 03 2019 at 11:07)</a>:</h4>
<p>Hmh, I guess we could, but then we can't do the verification anymore</p>



<a name="169557023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169557023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169557023">(Jul 03 2019 at 11:07)</a>:</h4>
<p>But my plan was to remove it in the long run</p>



<a name="169557033"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169557033" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169557033">(Jul 03 2019 at 11:07)</a>:</h4>
<p>yeah, I wondered about that, it also seems fine to keep it for verification purposes</p>



<a name="169557034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169557034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169557034">(Jul 03 2019 at 11:07)</a>:</h4>
<p>I'm just shooting for simplicity :)</p>



<a name="169557072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169557072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169557072">(Jul 03 2019 at 11:08)</a>:</h4>
<p>I'm fine with eventual simplicity :)</p>



<a name="169557077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169557077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169557077">(Jul 03 2019 at 11:08)</a>:</h4>
<blockquote>
<p>For solve-times?</p>
</blockquote>
<p>right I mean what are the "Test cases"</p>



<a name="169557099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169557099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169557099">(Jul 03 2019 at 11:08)</a>:</h4>
<p>Ah, the test cases are all the facts generated by analysing 1738 of the most popular (downloads on <a href="http://crates.io" target="_blank" title="http://crates.io">crates.io</a> and stars on github) crates</p>



<a name="169557110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169557110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169557110">(Jul 03 2019 at 11:08)</a>:</h4>
<p>I have more, but ran out of hard disk space to store the facts</p>



<a name="169557968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169557968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169557968">(Jul 03 2019 at 11:27)</a>:</h4>
<blockquote>
<p>... generated by analysing 1738 of the most popular (downloads on <a href="http://crates.io" target="_blank" title="http://crates.io">crates.io</a> and stars on github) crates</p>
</blockquote>
<p>do you happen to remember how many of those actually failed to build ?</p>



<a name="169558207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169558207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169558207">(Jul 03 2019 at 11:32)</a>:</h4>
<p>No, I didn't collect that data. Hmm, I even think a vast number of those succeeded building</p>



<a name="169558224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169558224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169558224">(Jul 03 2019 at 11:32)</a>:</h4>
<p>Because I may have only included those</p>



<a name="169558227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169558227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169558227">(Jul 03 2019 at 11:32)</a>:</h4>
<p>Yes, I think so</p>



<a name="169558235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169558235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169558235">(Jul 03 2019 at 11:33)</a>:</h4>
<p>That's not great now that I think about it</p>



<a name="169558308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169558308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169558308">(Jul 03 2019 at 11:34)</a>:</h4>
<p>oh it makes perfect sense to do so for benchmarks; I was just trying to gather new data by proxy, of possible Polonius bugs :)</p>



<a name="169558315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169558315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169558315">(Jul 03 2019 at 11:34)</a>:</h4>
<p>Oh, cool; the heatmap changes when you filter out the (arguably very few) functions above 10 000 edges in the CFG</p>



<a name="169558332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169558332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169558332">(Jul 03 2019 at 11:35)</a>:</h4>
<p>(almost all of them end up on 10 000 edges or fewer)</p>



<a name="169558405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169558405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169558405">(Jul 03 2019 at 11:36)</a>:</h4>
<p>Then the CFG doesn't matter at all, and the number of variables and <code>var_defined</code>dominate along with the other <code>var_...</code> tuples</p>



<a name="169558469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169558469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169558469">(Jul 03 2019 at 11:37)</a>:</h4>
<p>I can't wait for our correctness/testing/validation to be improved so we can see how many of those edges are actually needed. I have coined the term "differential liveness" and am looking for a reason to use it when we possibly bring CFG compression back from limbo :)</p>



<a name="169558704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/169558704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#169558704">(Jul 03 2019 at 11:41)</a>:</h4>
<p>(deleted)</p>



<a name="171398332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171398332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171398332">(Jul 22 2019 at 02:26)</a>:</h4>
<p><span class="user-mention" data-user-id="204115">@Albin Stjerna</span> I might need some new benchmarks more representative than <code>clap</code>, could you tell me which of your 10000 test crates looked interesting to profile ? (eg. the slowest running or the ones with the biggest overhead; or maybe also the ones where the overhead is big <em>without</em> counting the fact generation time) thanks in advance :)</p>



<a name="171445890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171445890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171445890">(Jul 22 2019 at 16:34)</a>:</h4>
<blockquote>
<p><span class="user-mention silent" data-user-id="204115">Albin Stjerna</span> I might need some new benchmarks more representative than <code>clap</code>, could you tell me which of your 10000 test crates looked interesting to profile ? (eg. the slowest running or the ones with the biggest overhead; or maybe also the ones where the overhead is big <em>without</em> counting the fact generation time) thanks in advance :)</p>
</blockquote>
<p>I don't measure fact-generation time (but I probably should). In fact, I don't even record specifically which repositories have timeouts or memory-outs. But I can get you a list of long-running repositories or repositories (in terms of Polonius runtime) with large inputs!</p>



<a name="171446023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171446023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171446023">(Jul 22 2019 at 16:36)</a>:</h4>
<p>The worst recorded runtime (a severe outlier by more than a factor of 10) is from this repo: <a href="https://github.com/thuleqaid/rust-aaplus" target="_blank" title="https://github.com/thuleqaid/rust-aaplus">https://github.com/thuleqaid/rust-aaplus</a></p>



<a name="171446081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171446081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171446081">(Jul 22 2019 at 16:37)</a>:</h4>
<p>Ah, so that's a large const array, surprise</p>



<a name="171446093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171446093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171446093">(Jul 22 2019 at 16:37)</a>:</h4>
<p>Let's see if I can find something a bit more interesting</p>



<a name="171446828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171446828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171446828">(Jul 22 2019 at 16:47)</a>:</h4>
<p>Fascinating, about 64% of the functions in the data set have no loans at all</p>



<a name="171447528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171447528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171447528">(Jul 22 2019 at 16:55)</a>:</h4>
<p><span class="user-mention" data-user-id="116113">@lqd</span> Hm, this method has the worst recorded runtime: <a href="https://github.com/rodrimati1992/type_level/blob/master/derive_type_level_lib/src/typelevel/compiletime_traits.rs#L29" target="_blank" title="https://github.com/rodrimati1992/type_level/blob/master/derive_type_level_lib/src/typelevel/compiletime_traits.rs#L29">https://github.com/rodrimati1992/type_level/blob/master/derive_type_level_lib/src/typelevel/compiletime_traits.rs#L29</a></p>



<a name="171447727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171447727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171447727">(Jul 22 2019 at 16:58)</a>:</h4>
<p>(deleted)</p>



<a name="171447784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171447784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171447784">(Jul 22 2019 at 16:59)</a>:</h4>
<p>Woops, I apparently managed to dump the whole file, not the head of the file</p>



<a name="171447953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171447953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171447953">(Jul 22 2019 at 17:00)</a>:</h4>
<p><a href="/user_uploads/4715/hLCwSpMwuVhlYOa-jUw-TMcb/largest.csv" target="_blank" title="largest.csv">Here's a CSV with the 500 slowest functions and their programs (=repositories)</a></p>



<a name="171453051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171453051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171453051">(Jul 22 2019 at 18:02)</a>:</h4>
<p><span class="user-mention" data-user-id="204115">@Albin Stjerna</span> awesome thanks a lot</p>



<a name="171453081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171453081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171453081">(Jul 22 2019 at 18:02)</a>:</h4>
<p>that will be super helpful, I’ll try some of them later tonight</p>



<a name="171453102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171453102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171453102">(Jul 22 2019 at 18:03)</a>:</h4>
<p>Let me know if you want actual fact files!</p>



<a name="171453105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171453105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171453105">(Jul 22 2019 at 18:03)</a>:</h4>
<p>I have fact files coming out of my ears</p>



<a name="171453108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171453108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171453108">(Jul 22 2019 at 18:03)</a>:</h4>
<p>Literally 400 GB</p>



<a name="171453195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171453195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171453195">(Jul 22 2019 at 18:04)</a>:</h4>
<p>But it was very good that you asked, because it made me aware of the no-loans outliers which had some very extreme values, and my data got much less messy after removing them</p>



<a name="171453275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171453275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171453275">(Jul 22 2019 at 18:05)</a>:</h4>
<p>the OOMs would be interesting to know, and like the other case I mentioned earlier we can even know if it’s in the facts or Polonius itself</p>



<a name="171453369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171453369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171453369">(Jul 22 2019 at 18:06)</a>:</h4>
<p>and also, the ones where Polonius and NLLs don’t give the same answer (I assume all these benchmarks must somehow compile today, any Polonius error would be... annoying :)</p>



<a name="171453447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171453447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171453447">(Jul 22 2019 at 18:07)</a>:</h4>
<p>but until my PR lands, at the very least this can happen in cases where Polonius lacks some "killed" facts, and there’s probably other bugs of the sort elsewhere</p>



<a name="171453582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171453582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171453582">(Jul 22 2019 at 18:09)</a>:</h4>
<p>(but if you got facts for most of those, I assume they didn’t OOM during fact generation)</p>



<a name="171453890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171453890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171453890">(Jul 22 2019 at 18:13)</a>:</h4>
<p>64% with no loans oh wow</p>



<a name="171453968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171453968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171453968">(Jul 22 2019 at 18:14)</a>:</h4>
<p>if there are no invalidations (when we’ve also dealt with illegal subsets relations) we can bail early :)</p>



<a name="171454037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171454037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171454037">(Jul 22 2019 at 18:15)</a>:</h4>
<p>(but some of the work I’ve been doing should help there anyway so I’ll check some of those out as well)</p>



<a name="171454352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171454352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171454352">(Jul 22 2019 at 18:19)</a>:</h4>
<p>do you have the data from which you’ve extracted the csv available somewhere ? I’m very much looking forward to reading your masters btw !</p>



<a name="171461041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171461041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171461041">(Jul 22 2019 at 19:41)</a>:</h4>
<blockquote>
<p>do you have the data from which you’ve extracted the csv available somewhere?</p>
</blockquote>
<p>No, I only have it in raw form otherwise, that is just the fact files in TSVs. Those are the 400 GBs of files. I do have some error logs which I think could be analysed to figure out what went wrong, but that's about it. From the perspective of my analysis, the CSV <em>is</em> the "raw" data.</p>
<blockquote>
<p>I’m very much looking forward to reading your masters btw !</p>
</blockquote>
<p>Aww thank you :)</p>



<a name="171461537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171461537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171461537">(Jul 22 2019 at 19:47)</a>:</h4>
<p>The runtime for the naive algorithm is...weird though. <a href="/user_uploads/4715/ObYGaA-kj3ScQ9NnxmLk7Si6/pasted_image.png" target="_blank" title="pasted_image.png">This is an attempt at correlating it to various inputs</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/ObYGaA-kj3ScQ9NnxmLk7Si6/pasted_image.png" target="_blank" title="This is an attempt at correlating it to various inputs"><img src="/user_uploads/4715/ObYGaA-kj3ScQ9NnxmLk7Si6/pasted_image.png"></a></div>



<a name="171461613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171461613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171461613">(Jul 22 2019 at 19:48)</a>:</h4>
<p>Looks almost exponential or something</p>



<a name="171461663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171461663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171461663">(Jul 22 2019 at 19:49)</a>:</h4>
<p>Also, even the less intelligent hybrid version <a href="/user_uploads/4715/pS9MHHR4gwbioNexW56R7x6P/pasted_image.png" target="_blank" title="pasted_image.png">pays off slightly</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/pS9MHHR4gwbioNexW56R7x6P/pasted_image.png" target="_blank" title="pays off slightly"><img src="/user_uploads/4715/pS9MHHR4gwbioNexW56R7x6P/pasted_image.png"></a></div>



<a name="171462298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462298">(Jul 22 2019 at 19:57)</a>:</h4>
<p>yeah the naive algorithm does a lot of compute and then throws most of it away</p>



<a name="171462401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462401">(Jul 22 2019 at 19:58)</a>:</h4>
<p>But apparently it's worth it!</p>



<a name="171462405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462405">(Jul 22 2019 at 19:58)</a>:</h4>
<p>That's the shocking part</p>



<a name="171462435"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462435" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462435">(Jul 22 2019 at 19:59)</a>:</h4>
<blockquote>
<p>From the perspective of my analysis, the CSV <em>is</em> the "raw" data.</p>
<p>yeah this CSV is what I was referring to as "the data", ie on the whole 10k suite</p>
</blockquote>



<a name="171462449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462449">(Jul 22 2019 at 19:59)</a>:</h4>
<p>Ah, ok, well <em>that</em> I can just upload</p>



<a name="171462460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462460">(Jul 22 2019 at 19:59)</a>:</h4>
<p>err, maybe</p>



<a name="171462506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462506">(Jul 22 2019 at 20:00)</a>:</h4>
<p>no one else will probably read this, so I can tell you, I tried heavily filtering the variants, the speed on clap is insane :p</p>



<a name="171462543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462543">(Jul 22 2019 at 20:00)</a>:</h4>
<p>ok, it's 500MB so maybe not</p>



<a name="171462581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462581">(Jul 22 2019 at 20:00)</a>:</h4>
<p>What does "heavily filtering" mean?</p>



<a name="171462588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462588">(Jul 22 2019 at 20:00)</a>:</h4>
<p>What did you filter in/out?</p>



<a name="171462629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462629">(Jul 22 2019 at 20:01)</a>:</h4>
<p>only tracking the loans which can have errors, only do the TC on the regions downstream from the borrow regions of the loans which can be invalidated</p>



<a name="171462744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462744">(Jul 22 2019 at 20:02)</a>:</h4>
<p>(kinda annoying wrt illegal subset relations, but as the DatafrogOpt variant couldn't compute them via <code>subset</code> we'd have to deal with that eventually, and I think I can do this filtering for good)</p>



<a name="171462787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462787">(Jul 22 2019 at 20:02)</a>:</h4>
<p>Ah, ok. When do you do the filtering? When generating facts or in Polonius itself?</p>



<a name="171462809"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462809" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462809">(Jul 22 2019 at 20:03)</a>:</h4>
<p>rn in Polonius</p>



<a name="171462827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462827">(Jul 22 2019 at 20:03)</a>:</h4>
<p>Ah, ok</p>



<a name="171462839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462839">(Jul 22 2019 at 20:03)</a>:</h4>
<p>to be able to use the same infrastructure to share between the loc insensitive variant and the variants</p>



<a name="171462851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462851">(Jul 22 2019 at 20:03)</a>:</h4>
<p><a href="https://we.tl/t-HYSaCIUqNd" target="_blank" title="https://we.tl/t-HYSaCIUqNd">Here's the full CSV</a></p>



<a name="171462931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462931">(Jul 22 2019 at 20:04)</a>:</h4>
<p>except that I can also only filter for each analysis, and it does basically the same thing on clap</p>



<a name="171462939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462939">(Jul 22 2019 at 20:04)</a>:</h4>
<p>that's why I'd like to try on more inputs</p>



<a name="171462949"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462949" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462949">(Jul 22 2019 at 20:04)</a>:</h4>
<p>thanks a lot for the CSV :)</p>



<a name="171462958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171462958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171462958">(Jul 22 2019 at 20:04)</a>:</h4>
<p>No problem! :)</p>



<a name="171463031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171463031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171463031">(Jul 22 2019 at 20:05)</a>:</h4>
<p>I can send you the WIP if you want</p>



<a name="171463147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171463147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171463147">(Jul 22 2019 at 20:06)</a>:</h4>
<p>(once you know what to do it's pretty simple anyway)</p>



<a name="171463351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171463351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171463351">(Jul 22 2019 at 20:09)</a>:</h4>
<p>Sure, why not</p>



<a name="171463947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171463947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171463947">(Jul 22 2019 at 20:16)</a>:</h4>
<p>pretty effective on clap but we'll see</p>



<a name="171464031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464031">(Jul 22 2019 at 20:17)</a>:</h4>
<p>the locinsensitive pre-pass would just more heavily filter the possible loans</p>



<a name="171464056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464056">(Jul 22 2019 at 20:17)</a>:</h4>
<p>instead of all the invalidated ones</p>



<a name="171464138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464138">(Jul 22 2019 at 20:18)</a>:</h4>
<p>That sounds like a good idea</p>



<a name="171464166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464166">(Jul 22 2019 at 20:18)</a>:</h4>
<p>I wonder how well the input facts would compress, given that they are tab-separated text files</p>



<a name="171464176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464176">(Jul 22 2019 at 20:18)</a>:</h4>
<p>Probably incredibly well</p>



<a name="171464216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464216">(Jul 22 2019 at 20:19)</a>:</h4>
<p>(I also have a prototype of sharing the pre-pass results)</p>



<a name="171464230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464230">(Jul 22 2019 at 20:19)</a>:</h4>
<p>haha yeah maybe :)</p>



<a name="171464330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464330">(Jul 22 2019 at 20:20)</a>:</h4>
<p>if it does well on other inputs, I wish I tried this a year ago...</p>



<a name="171464368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464368">(Jul 22 2019 at 20:21)</a>:</h4>
<p>I really wish we had a robust benchmarking infrastructure of some sort</p>



<a name="171464424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464424">(Jul 22 2019 at 20:21)</a>:</h4>
<p>Every time I think about something to optimise I see the wall in the factory at CERN where they made the gigantic dipole magnets; YOU CAN ONLY MAKE AS WELL AS YOU CAN MEASURE</p>



<a name="171464428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464428">(Jul 22 2019 at 20:21)</a>:</h4>
<p>maybe we can extend lolbench</p>



<a name="171464528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464528">(Jul 22 2019 at 20:22)</a>:</h4>
<p>It seems defunct?</p>



<a name="171464569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464569">(Jul 22 2019 at 20:23)</a>:</h4>
<p>I have a strong feeling the route of "improvise a set of Python scripts" isn't the right one :)</p>



<a name="171464582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464582">(Jul 22 2019 at 20:23)</a>:</h4>
<p>Or, it absolutely was for shipping my thesis on time, but not for infrastructure</p>



<a name="171464605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464605">(Jul 22 2019 at 20:23)</a>:</h4>
<p>yeah anp doesn't have much time to work on it nowadays, but he did a bunch of work on it, to get stable numbers, gather hardware counters, etc</p>



<a name="171464656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464656">(Jul 22 2019 at 20:24)</a>:</h4>
<p>automate regression detection etc</p>



<a name="171464681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464681">(Jul 22 2019 at 20:24)</a>:</h4>
<p>he did a talk about it as well</p>



<a name="171464691"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171464691" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171464691">(Jul 22 2019 at 20:24)</a>:</h4>
<p>Cool</p>



<a name="171465412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171465412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171465412">(Jul 22 2019 at 20:35)</a>:</h4>
<blockquote>
<p>I wonder how well the input facts would compress, given that they are tab-separated text files</p>
</blockquote>
<p>I think 10x easily (esp for the bigger ones, like clap), maybe it could be interesting to have them as zip files in the repo and the polonius binary could stream the .facts files</p>



<a name="171465512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171465512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171465512">(Jul 22 2019 at 20:36)</a>:</h4>
<p>although I think clap's size has reduced a lot since you regenerated it in the liveness PR</p>



<a name="171465614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171465614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171465614">(Jul 22 2019 at 20:38)</a>:</h4>
<p>I don't know if it's from rustc changes or something else (what version of clap did you generate those from ?) but I think the Naive variant processed the new ones around twice as fast as the old facts</p>



<a name="171516269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171516269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171516269">(Jul 23 2019 at 13:09)</a>:</h4>
<blockquote>
<p>what version of clap did you generate those from?</p>
</blockquote>
<p>The one in current crater, I think.</p>
<p>Yes, there definitely is a lot of interactions with other rustc changes affecting the Polonius inputs.</p>



<a name="171516359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171516359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171516359">(Jul 23 2019 at 13:10)</a>:</h4>
<p>in crater or the old in rustc-perf ?</p>



<a name="171516395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171516395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171516395">(Jul 23 2019 at 13:10)</a>:</h4>
<p>(the latter is the one which caused problems IIRC)</p>



<a name="171517896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171517896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171517896">(Jul 23 2019 at 13:28)</a>:</h4>
<p>I'm having a bit of trouble reproducing some of the slower benchmarks you mentioned, maybe generating the facts has become quite slow</p>



<a name="171518359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171518359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171518359">(Jul 23 2019 at 13:33)</a>:</h4>
<p>(probably when the liveness  or partial initialization data is huge ? -- update: yes in this benchmark's case it was a lot of <code>var_initialized_at_exit</code> taking 10x the time)</p>



<a name="171531706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171531706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171531706">(Jul 23 2019 at 15:53)</a>:</h4>
<p>Hmm, it was probably the old one in rustc-perf now that you mention it</p>



<a name="171531781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171531781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171531781">(Jul 23 2019 at 15:54)</a>:</h4>
<p>Yes, probably. It's incredibly inefficiently implemented which might skew the results</p>



<a name="171531796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171531796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171531796">(Jul 23 2019 at 15:54)</a>:</h4>
<p>Means I will probably have to re-do the analysis</p>



<a name="171531804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171531804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171531804">(Jul 23 2019 at 15:54)</a>:</h4>
<p>Given that I'm currently working on removing that input</p>



<a name="171533612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171533612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171533612">(Jul 23 2019 at 16:17)</a>:</h4>
<p>just to make sure I checked <code>typelevel-compiletime_traits-{{impl}}[1]-to_tokens</code> I can reproduce your 30+s seconds on the Naive variant, and indeed my latest rev works nicely on it</p>



<a name="171533734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171533734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171533734">(Jul 23 2019 at 16:18)</a>:</h4>
<p>are the Naive/Hybrid/DatafrogOpt times in your CSV taken with rustc btw ? or by running polonius with -a ?</p>



<a name="171534107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171534107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171534107">(Jul 23 2019 at 16:23)</a>:</h4>
<p>to make sure again, are these benchmarks only for code which has no errors under <code>-Z polonius</code> ? if that's the case I wonder if the <code>LocationInsensitive</code> returns errors in some of these cases, so we can see the difference it would make to share the results from <code>LocationInsensitive</code> to <code>DatafrogOpt</code> in the <code>Hybrid</code> variant.</p>



<a name="171534359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171534359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171534359">(Jul 23 2019 at 16:27)</a>:</h4>
<p>(although it's <em>possible</em> the <code>Naive</code> variant is already getting good enough at finding no errors pretty fast - again, modulo subregion obligations; it may be time for some synthetic benchmarks as well)</p>



<a name="171541104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171541104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171541104">(Jul 23 2019 at 17:48)</a>:</h4>
<blockquote>
<p>are the Naive/Hybrid/DatafrogOpt times in your CSV taken with rustc btw ? or by running polonius with -a ?</p>
</blockquote>
<p>Just running Polonius! Specifically, I have <code>--skip-timing --ignore-region-live-at</code></p>



<a name="171541146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171541146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171541146">(Jul 23 2019 at 17:49)</a>:</h4>
<p>Regarding errors, that's...harder</p>



<a name="171541161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171541161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171541161">(Jul 23 2019 at 17:49)</a>:</h4>
<p>But anything that returns a non-zero exit status on fact generation would have been discarded</p>



<a name="171541460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171541460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171541460">(Jul 23 2019 at 17:52)</a>:</h4>
<p>Or anything that returned something non-zero when doing <code>cargo +nightly check</code> with <code>RUSTFLAGS</code> set to <code>-Zborrowck=mir</code></p>



<a name="171541595"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171541595" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171541595">(Jul 23 2019 at 17:53)</a>:</h4>
<p>Oh, I should add: times are recorded by Python itself and I'm taking the minimum over three runs</p>



<a name="171541680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171541680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171541680">(Jul 23 2019 at 17:54)</a>:</h4>
<p>It should be the same as the standard unix <code>time</code> command would report, but who knows how it would relate to the Polonius output</p>



<a name="171541733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171541733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171541733">(Jul 23 2019 at 17:55)</a>:</h4>
<p>Actually, if I ever re-do it, I should probably only run one time and in stead parse the output and use the times reported by Polonius, but I just wanted something I knew worked and not have to deal with wonky output or mismatches etc</p>



<a name="171558677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171558677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171558677">(Jul 23 2019 at 21:16)</a>:</h4>
<p>ah ok, running the polonius binary will also contain the time to read the files on disk, there will be many avoidable clones of the facts, etc</p>



<a name="171587246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171587246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171587246">(Jul 24 2019 at 08:22)</a>:</h4>
<p>Yes, that's true</p>



<a name="171587309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171587309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171587309">(Jul 24 2019 at 08:23)</a>:</h4>
<p>Maybe we should put some work into a pure profiling mode, e.g. one that, say, outputs CSV directly to stdout</p>



<a name="171587327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171587327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171587327">(Jul 24 2019 at 08:23)</a>:</h4>
<p>(by "we" I mean "I")</p>



<a name="171587339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171587339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171587339">(Jul 24 2019 at 08:23)</a>:</h4>
<p>But there already is something like that for rustc, right?</p>



<a name="171587876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171587876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171587876">(Jul 24 2019 at 08:33)</a>:</h4>
<p>yeah and that's what lokalmatador was working on, using the profiling systems inside rustc to time polonius</p>



<a name="171587911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171587911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171587911">(Jul 24 2019 at 08:34)</a>:</h4>
<p>since they were already gathering some data I assume the general setup was completed</p>



<a name="171588002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171588002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171588002">(Jul 24 2019 at 08:35)</a>:</h4>
<p>ah but they might have deleted their GH account, with the WIP branch mentioned <a href="#narrow/stream/186049-t-compiler.2Fwg-polonius/topic/profiling/near/166400526" title="#narrow/stream/186049-t-compiler.2Fwg-polonius/topic/profiling/near/166400526">here</a></p>



<a name="171606672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/171606672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#171606672">(Jul 24 2019 at 13:41)</a>:</h4>
<p>Oh, that's too bad</p>



<a name="178859146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/178859146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#178859146">(Oct 23 2019 at 14:32)</a>:</h4>
<p>Ok I should absolutely talk to Yannis about Polonius, I just need to catch him when he’s not being accosted by anyone else which is all the time</p>



<a name="178859222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/178859222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#178859222">(Oct 23 2019 at 14:33)</a>:</h4>
<p>I think Niko talked to him about that at SPLASH last year :)</p>



<a name="178929702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/178929702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#178929702">(Oct 24 2019 at 08:09)</a>:</h4>
<p>He held a talk about how Datalog was the future of programming specifically mentioning some problematic join patterns that I'm quite sure are behind my abysmal liveness performance</p>



<a name="178930631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/178930631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#178930631">(Oct 24 2019 at 08:23)</a>:</h4>
<p>HA Yannis promised to have a look at my Datalog rules and see if he saw some Smart Things™️ I could do. He also seemed genuinely sad <span class="user-mention" data-user-id="116009">@nikomatsakis</span> wasn't coming. :(</p>



<a name="178936088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/178936088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#178936088">(Oct 24 2019 at 09:48)</a>:</h4>
<p>(I think I didn't mention it but I also worked on helping automate more of our datalog to datafrog pipeline specifically to implement the provenance graphs rules rewriting Yannis describes in the declarative debugging paper)</p>



<a name="178937917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/178937917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#178937917">(Oct 24 2019 at 10:14)</a>:</h4>
<p>(oh and if anyone is interested in the specific talk, it's from a <a href="https://arxiv.org/abs/1905.00402" target="_blank" title="https://arxiv.org/abs/1905.00402">paper from a few months back</a> and is <a href="https://www.youtube.com/watch?v=iwOFK6M1gG8" target="_blank" title="https://www.youtube.com/watch?v=iwOFK6M1gG8">already available on youtube</a>)</p>
<div class="youtube-video message_inline_image"><a data-id="iwOFK6M1gG8" href="https://www.youtube.com/watch?v=iwOFK6M1gG8" target="_blank" title="https://www.youtube.com/watch?v=iwOFK6M1gG8"><img src="https://i.ytimg.com/vi/iwOFK6M1gG8/default.jpg"></a></div>



<a name="178953383"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/178953383" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#178953383">(Oct 24 2019 at 13:51)</a>:</h4>
<p>Wow cool!</p>



<a name="178953799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/178953799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#178953799">(Oct 24 2019 at 13:55)</a>:</h4>
<p>Also I of course didn’t ask Yannis to debug my code, I said hi, explained what I had been working on and asked for a book recommendation.</p>



<a name="178953816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/178953816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#178953816">(Oct 24 2019 at 13:56)</a>:</h4>
<p>I realised I sounded like a jerk</p>



<a name="179271359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/179271359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#179271359">(Oct 28 2019 at 20:19)</a>:</h4>
<p>I have been thinking about something. If the root of the performance problem with liveness and initialisation is that we over-compute, why don't we compute these relations top-down instead? I.e first compute a set of potentially interesting origins by joining with potential errors, then join that subset to their corresponding variables, and then compute liveness for <em>those</em> variables?</p>



<a name="179271550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/179271550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#179271550">(Oct 28 2019 at 20:21)</a>:</h4>
<p>And the same with initialisation of course; first compute a set of interesting move paths by finding accesses and reference-containing structs, and then determining the initialisation for those?</p>



<a name="179271758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/179271758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#179271758">(Oct 28 2019 at 20:23)</a>:</h4>
<p>We probably should. I think that we need to be a bit more clever to see large enough savings, and having everything fully implemented makes this easier.</p>



<a name="179273560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/179273560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#179273560">(Oct 28 2019 at 20:42)</a>:</h4>
<p>Ok, good, that means I haven't completely misunderstood everything :)</p>



<a name="179288941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/179288941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#179288941">(Oct 29 2019 at 00:09)</a>:</h4>
<p>computing the set of potentially interesting origins with potential errors and then going up is the version of the Naive variant I sent you a couple months back, and which I've recently said made 20x on liveness on clap :) (and that was only using invalidated loans here, the potential erroneous loans from <code>LocationInsensitive</code> filter everything even more as I prototyped before)</p>



<a name="179289137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/179289137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#179289137">(Oct 29 2019 at 00:12)</a>:</h4>
<p>and 30x on initialization on clap, but prevented from computing all init/move errors, since it was computing over only move paths belonging to variables having origins in their types into which potential erroneous loans could flow</p>



<a name="179289442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/179289442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#179289442">(Oct 29 2019 at 00:19)</a>:</h4>
<p>(it will still be bottom-up unless you don't mean top-down/bottom-up in the datalog/prolog sense, and overall there are also eg the MST/DT transforms which hope to make a query's bottom-up evaluation need the tuples a top-down evaluation would need; and if you do mean top-down in the datalog sense then we'd need a different "solver", like an SLG solver, maybe chalk's)</p>



<a name="179289838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/179289838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#179289838">(Oct 29 2019 at 00:27)</a>:</h4>
<p>until we have all we need implemented, the performance work and the completeness work kinda deadlock each other, for example: depending on how we implement illegal subset relations, the filtering we describe here could be undersirable (even <code>DatafrogOpt</code> already clashes with some of these different possibilities). now for this particular example, placeholder loans (the 3rd way to implement these errors) seem to allow for these optimisations so yay</p>



<a name="179289988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/179289988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#179289988">(Oct 29 2019 at 00:30)</a>:</h4>
<p>and, probably, "all we need" doesn't include the currently nebulous plan of dealing with higher ranked subregions via a chalk-to-polonius lowering step :) (I hope)</p>



<a name="179346193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/179346193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#179346193">(Oct 29 2019 at 16:23)</a>:</h4>
<blockquote>
<p>... unless you don't mean top-down/bottom-up in the datalog/prolog sense ...</p>
</blockquote>
<p>I did, but I meant in the dumbest way possible</p>



<a name="179346198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/179346198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#179346198">(Oct 29 2019 at 16:23)</a>:</h4>
<p>(thank you for explaining!)</p>



<a name="179346284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/179346284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#179346284">(Oct 29 2019 at 16:24)</a>:</h4>
<p>I meant as in, do the joins in datafrog one at a time and compute them until fixpoint one at a time</p>



<a name="179346288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/performance/near/179346288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanda Stjerna <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/performance.html#179346288">(Oct 29 2019 at 16:24)</a>:</h4>
<p>For some interesting tuples</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>